<?php
/**
 * Created by PhpStorm.
 * User: DD
 * Date: 2016/4/22
 * Time: 0:51
 */

namespace app\admin\controller;


use app\admin\services\UtilService;
use app\common\controller\Base;
use think\Config;

class Util extends Base
{
    /**
     * @var UtilService
     */
    protected $_service;

    protected function _setService()
    {
        $this->_service = new UtilService();
    }

    public function uploadImg()
    {
//        $rt = $this->_service->uploadImg();
//        if ($rt[0]) {
//            return $this->jsonSuccess($rt[1]);
//        } else {
//            return $this->jsonFail($rt[1]);
//        }
        $rt = R('services/Uploader/uploadImg');
//        if ($rt['status'] == 1) {
//            $rt['info'] = Config::get('oss.OSS_IMAGE_HOST') . $rt['info'];
//        }
        return $rt;
    }
}